const Koa = require('koa')
const InitManager = require('./core/init')
const parser = require('koa-bodyparser')
const cors = require('@koa/cors');
const static = require('koa-static');
const catchError = require('./middlewares/exception')
const admiMiddleware = require('./middlewares/adminMidleware')
const app = new Koa()

console.log(__dirname+ '/web/dist')
app.use(static(__dirname+ '/web/dist'))
app.use(admiMiddleware)
app.use(cors())
app.use(catchError)
app.use(parser())

InitManager.initCore(app)

app.listen(3000)
